<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>useragent_test.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="local_closure_goog_useragent_useragent_test.js.html">useragent_test.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2006 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>goog.provide(&#39;goog.userAgentTest&#39;);
<a name="line16"></a>goog.setTestOnly(&#39;goog.userAgentTest&#39;);
<a name="line17"></a>
<a name="line18"></a>goog.require(&#39;goog.array&#39;);
<a name="line19"></a>goog.require(&#39;goog.labs.userAgent.testAgents&#39;);
<a name="line20"></a>goog.require(&#39;goog.labs.userAgent.util&#39;);
<a name="line21"></a>goog.require(&#39;goog.testing.PropertyReplacer&#39;);
<a name="line22"></a>goog.require(&#39;goog.testing.jsunit&#39;);
<a name="line23"></a>goog.require(&#39;goog.userAgent&#39;);
<a name="line24"></a>goog.require(&#39;goog.userAgentTestUtil&#39;);
<a name="line25"></a>
<a name="line26"></a>
<a name="line27"></a>var documentMode;
<a name="line28"></a>goog.userAgent.getDocumentMode_ = function() {
<a name="line29"></a>  return documentMode;
<a name="line30"></a>};
<a name="line31"></a>
<a name="line32"></a>
<a name="line33"></a>var propertyReplacer = new goog.testing.PropertyReplacer();
<a name="line34"></a>
<a name="line35"></a>var UserAgents = {
<a name="line36"></a>  GECKO: &#39;GECKO&#39;,
<a name="line37"></a>  IE: &#39;IE&#39;,
<a name="line38"></a>  OPERA: &#39;OPERA&#39;,
<a name="line39"></a>  WEBKIT: &#39;WEBKIT&#39;
<a name="line40"></a>};
<a name="line41"></a>
<a name="line42"></a>
<a name="line43"></a>function tearDown() {
<a name="line44"></a>  documentMode = undefined;
<a name="line45"></a>  propertyReplacer.reset();
<a name="line46"></a>}
<a name="line47"></a>
<a name="line48"></a>
<a name="line49"></a>/**
<a name="line50"></a> * Test browser detection for a user agent configuration.
<a name="line51"></a> * @param {Array.&lt;number&gt;} expectedAgents Array of expected userAgents.
<a name="line52"></a> * @param {string} uaString User agent string.
<a name="line53"></a> * @param {string=} opt_product Navigator product string.
<a name="line54"></a> * @param {string=} opt_vendor Navigator vendor string.
<a name="line55"></a> */
<a name="line56"></a>function assertUserAgent(expectedAgents, uaString, opt_product, opt_vendor) {
<a name="line57"></a>  var mockGlobal = {
<a name="line58"></a>    &#39;navigator&#39;: {
<a name="line59"></a>      &#39;userAgent&#39;: uaString,
<a name="line60"></a>      &#39;product&#39;: opt_product,
<a name="line61"></a>      &#39;vendor&#39;: opt_vendor
<a name="line62"></a>    }
<a name="line63"></a>  };
<a name="line64"></a>  propertyReplacer.set(goog, &#39;global&#39;, mockGlobal);
<a name="line65"></a>
<a name="line66"></a>  goog.labs.userAgent.util.setUserAgent(null);
<a name="line67"></a>
<a name="line68"></a>  goog.userAgentTestUtil.reinitializeUserAgent();
<a name="line69"></a>  for (var ua in UserAgents) {
<a name="line70"></a>    var isExpected = goog.array.contains(expectedAgents, UserAgents[ua]);
<a name="line71"></a>    assertEquals(isExpected,
<a name="line72"></a>        goog.userAgentTestUtil.getUserAgentDetected(UserAgents[ua]));
<a name="line73"></a>  }
<a name="line74"></a>}
<a name="line75"></a>
<a name="line76"></a>function testOperaInit() {
<a name="line77"></a>  var mockOpera = {
<a name="line78"></a>    &#39;version&#39;: function() {
<a name="line79"></a>      return &#39;9.20&#39;;
<a name="line80"></a>    }
<a name="line81"></a>  };
<a name="line82"></a>
<a name="line83"></a>  var mockGlobal = {
<a name="line84"></a>    &#39;navigator&#39;: {
<a name="line85"></a>      &#39;userAgent&#39;: &#39;Opera/9.20 (Windows NT 5.1; U; de),gzip(gfe)&#39;
<a name="line86"></a>    },
<a name="line87"></a>    &#39;opera&#39;: mockOpera
<a name="line88"></a>  };
<a name="line89"></a>  propertyReplacer.set(goog, &#39;global&#39;, mockGlobal);
<a name="line90"></a>
<a name="line91"></a>  propertyReplacer.set(goog.userAgent, &#39;getUserAgentString&#39;, function() {
<a name="line92"></a>    return &#39;Opera/9.20 (Windows NT 5.1; U; de),gzip(gfe)&#39;;
<a name="line93"></a>  });
<a name="line94"></a>
<a name="line95"></a>  goog.labs.userAgent.util.setUserAgent(null);
<a name="line96"></a>  goog.userAgentTestUtil.reinitializeUserAgent();
<a name="line97"></a>  assertTrue(goog.userAgent.OPERA);
<a name="line98"></a>  assertEquals(&#39;9.20&#39;, goog.userAgent.VERSION);
<a name="line99"></a>
<a name="line100"></a>  // What if &#39;opera&#39; global has been overwritten?
<a name="line101"></a>  // We must degrade gracefully (rather than throwing JS errors).
<a name="line102"></a>  propertyReplacer.set(goog.global, &#39;opera&#39;, &#39;bobloblaw&#39;);
<a name="line103"></a>
<a name="line104"></a>  // NOTE(nnaze): window.opera is now ignored with the migration to
<a name="line105"></a>  // goog.labs.userAgent.*. Version is expected to should stay the same.
<a name="line106"></a>  goog.labs.userAgent.util.setUserAgent(null);
<a name="line107"></a>  goog.userAgentTestUtil.reinitializeUserAgent();
<a name="line108"></a>  assertUndefined(goog.userAgent.VERSION);
<a name="line109"></a>}
<a name="line110"></a>
<a name="line111"></a>function testCompare() {
<a name="line112"></a>  assertTrue(&#39;exact equality broken&#39;,
<a name="line113"></a>             goog.userAgent.compare(&#39;1.0&#39;, &#39;1.0&#39;) == 0);
<a name="line114"></a>  assertTrue(&#39;mutlidot equality broken&#39;,
<a name="line115"></a>             goog.userAgent.compare(&#39;1.0.0.0&#39;, &#39;1.0&#39;) == 0);
<a name="line116"></a>  assertTrue(&#39;less than broken&#39;,
<a name="line117"></a>             goog.userAgent.compare(&#39;1.0.2.1&#39;, &#39;1.1&#39;) &lt; 0);
<a name="line118"></a>  assertTrue(&#39;greater than broken&#39;,
<a name="line119"></a>             goog.userAgent.compare(&#39;1.1&#39;, &#39;1.0.2.1&#39;) &gt; 0);
<a name="line120"></a>
<a name="line121"></a>  assertTrue(&#39;b broken&#39;, goog.userAgent.compare(&#39;1.1&#39;, &#39;1.1b&#39;) &gt; 0);
<a name="line122"></a>  assertTrue(&#39;b broken&#39;, goog.userAgent.compare(&#39;1.1b&#39;, &#39;1.1&#39;) &lt; 0);
<a name="line123"></a>  assertTrue(&#39;b broken&#39;, goog.userAgent.compare(&#39;1.1b&#39;, &#39;1.1b&#39;) == 0);
<a name="line124"></a>
<a name="line125"></a>  assertTrue(&#39;b&gt;a broken&#39;, goog.userAgent.compare(&#39;1.1b&#39;, &#39;1.1a&#39;) &gt; 0);
<a name="line126"></a>  assertTrue(&#39;a&lt;b broken&#39;, goog.userAgent.compare(&#39;1.1a&#39;, &#39;1.1b&#39;) &lt; 0);
<a name="line127"></a>}
<a name="line128"></a>
<a name="line129"></a>function testGecko() {
<a name="line130"></a>
<a name="line131"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5)&#39; +
<a name="line132"></a>      &#39;Gecko/20041202 Gecko/1.0&#39;, &#39;1.7.5&#39;);
<a name="line133"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6)&#39; +
<a name="line134"></a>      &#39;Gecko/20050512 Gecko&#39;, &#39;1.7.6&#39;);
<a name="line135"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8)&#39; +
<a name="line136"></a>      &#39;Gecko/20050609 Gecko/1.0.4&#39;, &#39;1.7.8&#39;);
<a name="line137"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9)&#39; +
<a name="line138"></a>      &#39;Gecko/20050711 Gecko/1.0.5&#39;, &#39;1.7.9&#39;);
<a name="line139"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10)&#39; +
<a name="line140"></a>      &#39;Gecko/20050716 Gecko/1.0.6&#39;, &#39;1.7.10&#39;);
<a name="line141"></a>  assertGecko(&#39;Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB;&#39; +
<a name="line142"></a>      &#39;rv:1.7.10) Gecko/20050717 Gecko/1.0.6&#39;, &#39;1.7.10&#39;);
<a name="line143"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12)&#39; +
<a name="line144"></a>      &#39;Gecko/20050915 Gecko/1.0.7&#39;, &#39;1.7.12&#39;);
<a name="line145"></a>  assertGecko(&#39;Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;&#39; +
<a name="line146"></a>      &#39;rv:1.7.12) Gecko/20050915 Gecko/1.0.7&#39;, &#39;1.7.12&#39;);
<a name="line147"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4)&#39; +
<a name="line148"></a>      &#39;Gecko/20050908 Gecko/1.4&#39;, &#39;1.8b4&#39;);
<a name="line149"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8)&#39; +
<a name="line150"></a>      &#39;Gecko/20051107 Gecko/1.5&#39;, &#39;1.8&#39;);
<a name="line151"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.1)&#39; +
<a name="line152"></a>      &#39;Gecko/20060111 Gecko/1.5.0.1&#39;, &#39;1.8.0.1&#39;);
<a name="line153"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.0.1)&#39; +
<a name="line154"></a>      &#39;Gecko/20060111 Gecko/1.5.0.1&#39;, &#39;1.8.0.1&#39;);
<a name="line155"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2)&#39; +
<a name="line156"></a>      &#39;Gecko/20060308 Gecko/1.5.0.2&#39;, &#39;1.8.0.2&#39;);
<a name="line157"></a>  assertGecko(&#39;Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;&#39; +
<a name="line158"></a>      &#39;rv:1.8.0.3) Gecko/20060426 Gecko/1.5.0.3&#39;, &#39;1.8.0.3&#39;);
<a name="line159"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3)&#39; +
<a name="line160"></a>      &#39;Gecko/20060426 Gecko/1.5.0.3&#39;, &#39;1.8.0.3&#39;);
<a name="line161"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4)&#39; +
<a name="line162"></a>      &#39;Gecko/20060508 Gecko/1.5.0.4&#39;, &#39;1.8.0.4&#39;);
<a name="line163"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4)&#39; +
<a name="line164"></a>      &#39;Gecko/20060508 Gecko/1.5.0.4&#39;, &#39;1.8.0.4&#39;);
<a name="line165"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.0.4)&#39; +
<a name="line166"></a>      &#39;Gecko/20060508 Gecko/1.5.0.4&#39;, &#39;1.8.0.4&#39;);
<a name="line167"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.6)&#39; +
<a name="line168"></a>      &#39;Gecko/20060728 Gecko/1.5.0.6&#39;, &#39;1.8.0.6&#39;);
<a name="line169"></a>  assertGecko(&#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6)&#39; +
<a name="line170"></a>      &#39;Gecko/20060808 Fedora/1.5.0.6-2.fc5 Gecko/1.5.0.6 pango-text&#39;,
<a name="line171"></a>      &#39;1.8.0.6&#39;);
<a name="line172"></a>  assertGecko(&#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)&#39; +
<a name="line173"></a>      &#39;Gecko/20060321 Gecko/2.0a1&#39;, &#39;1.8&#39;);
<a name="line174"></a>  assertGecko(&#39;Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/6.0 Firefox/6.0&#39;,
<a name="line175"></a>      &#39;6.0&#39;);
<a name="line176"></a>}
<a name="line177"></a>
<a name="line178"></a>function testIe() {
<a name="line179"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)&#39;, &#39;5.01&#39;);
<a name="line180"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)&#39;, &#39;5.17&#39;);
<a name="line181"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)&#39;, &#39;5.23&#39;);
<a name="line182"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)&#39;, &#39;5.5&#39;);
<a name="line183"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)&#39;, &#39;6.0&#39;);
<a name="line184"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)&#39;, &#39;6.0&#39;);
<a name="line185"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; &#39; +
<a name="line186"></a>      &#39;.NET CLR 1.1.4322)&#39;, &#39;6.0&#39;);
<a name="line187"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; &#39; +
<a name="line188"></a>      &#39;.NET CLR 2.0.50727)&#39;, &#39;6.0&#39;);
<a name="line189"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)&#39;, &#39;7.0b&#39;);
<a name="line190"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 7.0b; Win32)&#39;, &#39;7.0b&#39;);
<a name="line191"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)&#39;, &#39;7.0b&#39;);
<a name="line192"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1;&#39; +
<a name="line193"></a>      &#39;Arcor 5.005; .NET CLR 1.0.3705; .NET CLR 1.1.4322)&#39;, &#39;7.0&#39;);
<a name="line194"></a>  assertIe(
<a name="line195"></a>      &#39;Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko&#39;, &#39;11.0&#39;);
<a name="line196"></a>}
<a name="line197"></a>
<a name="line198"></a>function testIeDocumentModeOverride() {
<a name="line199"></a>  documentMode = 9;
<a name="line200"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0&#39;,
<a name="line201"></a>           &#39;9&#39;);
<a name="line202"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0&#39;,
<a name="line203"></a>           &#39;9&#39;);
<a name="line204"></a>
<a name="line205"></a>  documentMode = 8;
<a name="line206"></a>  assertIe(&#39;Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0&#39;,
<a name="line207"></a>           &#39;8.0&#39;);
<a name="line208"></a>}
<a name="line209"></a>
<a name="line210"></a>function testDocumentModeInStandardsMode() {
<a name="line211"></a>  goog.userAgentTestUtil.reinitializeUserAgent();
<a name="line212"></a>  var expectedMode = goog.userAgent.IE ? parseInt(goog.userAgent.VERSION) :
<a name="line213"></a>                                         undefined;
<a name="line214"></a>  assertEquals(expectedMode, goog.userAgent.DOCUMENT_MODE);
<a name="line215"></a>}
<a name="line216"></a>
<a name="line217"></a>function testOpera() {
<a name="line218"></a>  var assertOpera = function(uaString) {
<a name="line219"></a>    assertUserAgent([UserAgents.OPERA], uaString);
<a name="line220"></a>  };
<a name="line221"></a>  assertOpera(&#39;Opera/7.23 (Windows 98; U) [en]&#39;);
<a name="line222"></a>  assertOpera(&#39;Opera/8.00 (Windows NT 5.1; U; en)&#39;);
<a name="line223"></a>  assertOpera(&#39;Opera/8.0 (X11; Linux i686; U; cs)&#39;);
<a name="line224"></a>  assertOpera(&#39;Opera/8.02 (Windows NT 5.1; U; en)&#39;);
<a name="line225"></a>  assertOpera(&#39;Opera/8.50 (Windows NT 5.1; U; en)&#39;);
<a name="line226"></a>  assertOpera(&#39;Opera/8.5 (X11; Linux i686; U; cs)&#39;);
<a name="line227"></a>  assertOpera(&#39;Opera/8.51 (Windows NT 5.1; U; en)&#39;);
<a name="line228"></a>  assertOpera(&#39;Opera/9.0 (Windows NT 5.0; U; en)&#39;);
<a name="line229"></a>  assertOpera(&#39;Opera/9.00 (Macintosh; PPC Mac OS X; U; en)&#39;);
<a name="line230"></a>  assertOpera(&#39;Opera/9.00 (Windows NT 5.1; U; en)&#39;);
<a name="line231"></a>  assertOpera(&#39;Opera/9.00 (Windows NT 5.2; U; en)&#39;);
<a name="line232"></a>  assertOpera(&#39;Opera/9.00 (Windows NT 6.0; U; en)&#39;);
<a name="line233"></a>}
<a name="line234"></a>
<a name="line235"></a>function testWebkit() {
<a name="line236"></a>  var testAgents = goog.labs.userAgent.testAgents;
<a name="line237"></a>  assertWebkit(testAgents.ANDROID_BROWSER_403);
<a name="line238"></a>  assertWebkit(testAgents.ANDROID_BROWSER_403_ALT);
<a name="line239"></a>}
<a name="line240"></a>
<a name="line241"></a>function testUnknownBrowser() {
<a name="line242"></a>  assertUserAgent([], &#39;MyWebBrowser&#39;);
<a name="line243"></a>  assertUserAgent([], undefined);
<a name="line244"></a>}
<a name="line245"></a>
<a name="line246"></a>function testNoNavigator() {
<a name="line247"></a>  // global object has no &quot;navigator&quot; property.
<a name="line248"></a>  var mockGlobal = {};
<a name="line249"></a>  propertyReplacer.set(goog, &#39;global&#39;, mockGlobal);
<a name="line250"></a>  goog.labs.userAgent.util.setUserAgent(null);
<a name="line251"></a>  goog.userAgentTestUtil.reinitializeUserAgent();
<a name="line252"></a>
<a name="line253"></a>  assertEquals(&#39;Platform should be the empty string&#39;, &#39;&#39;,
<a name="line254"></a>      goog.userAgent.PLATFORM);
<a name="line255"></a>  assertEquals(&#39;Version should be the empty string&#39;, &#39;&#39;,
<a name="line256"></a>      goog.userAgent.VERSION);
<a name="line257"></a>}
<a name="line258"></a>
<a name="line259"></a>function assertIe(uaString, expectedVersion) {
<a name="line260"></a>  assertUserAgent([UserAgents.IE], uaString);
<a name="line261"></a>  assertEquals(&#39;User agent &#39; + uaString + &#39; should have had version &#39; +
<a name="line262"></a>      expectedVersion + &#39; but had &#39; + goog.userAgent.VERSION,
<a name="line263"></a>      expectedVersion,
<a name="line264"></a>      goog.userAgent.VERSION);
<a name="line265"></a>}
<a name="line266"></a>
<a name="line267"></a>function assertGecko(uaString, expectedVersion) {
<a name="line268"></a>  assertUserAgent([UserAgents.GECKO], uaString, &#39;Gecko&#39;);
<a name="line269"></a>  assertEquals(&#39;User agent &#39; + uaString + &#39; should have had version &#39; +
<a name="line270"></a>      expectedVersion + &#39; but had &#39; + goog.userAgent.VERSION,
<a name="line271"></a>      expectedVersion,
<a name="line272"></a>      goog.userAgent.VERSION);
<a name="line273"></a>}
<a name="line274"></a>
<a name="line275"></a>function assertWebkit(uaString) {
<a name="line276"></a>  assertUserAgent([UserAgents.WEBKIT], uaString, &#39;WebKit&#39;);
<a name="line277"></a>}
</pre>


</body>
</html>
